package com.lin.service.Impl;

import com.lin.dao.BookDao;
import com.lin.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("bookService")
public class BookServiceImpl implements BookService {
    @Autowired
    private BookDao bookDao;

//    @Autowired
//    public void xxx(BookDao bookDao) {
//        System.out.println("xxx: " + bookDao);
//    }

    @Autowired
    public void yyy(List<BookDao> bookDaoList) {
        System.out.println("yyy: " + bookDaoList);
    }

    @Override
    public void buyBook(int num) {
        bookDao.buyBook(num);
        System.out.println(bookDao);
    }
}
